ALL = ftserver ftclient
CC = gcc
CFLAGS = -g -Wall -pedantic
ARCH = $(shell uname -p)
ifeq ($(ARCH), sparc)
LIBS = -lm -lsocket -lnsl
else
LIBS = -lm
endif

all: $(ALL)

clean:
	rm -rf $(ALL) *.o

ftserver:  myftserver.c
	$(CC) $(CFLAGS) -o ftserver myftserver.c dropper.c $(LIBS)

ftclient:  myftclient.c
	$(CC) $(CFLAGS) -o ftclient myftclient.c dropper.c $(LIBS)

